var adminArea = {

	init: function() {
            //adminArea.newCliForm();
            //adminArea.newCarForm();
            //adminArea.newParkForm();
        },

	newCliForm: function() {
		var newCli = document.getElementById('newCliDiv');
                
                if(newCli) {
			newCli.onclick = function() {
                            var reqAjax = ajax.beginAjax(),
                                span = document.getElementById('formCli');
                                
                            reqAjax.open("GET", "newCliForm.php", false);
                            reqAjax.send(null);

                            if(reqAjax.readyState == 4){
                               span.innerHTML = reqAjax.response;
                               adminArea.getCliData();
                               mask.setCliMask();
                            }
			};
		}
	},
        
        
        
        /*newParkForm: function() {
		var newPark = document.getElementById('newParkDiv');
		
                if(newPark) {
			newPark.onclick = function() {
                            var reqAjax = ajax.beginAjax(),
                                span = document.getElementById('formPark');
                                
                            reqAjax.open("GET", "newParkForm.php", false);
                            reqAjax.send(null);

                            if(reqAjax.readyState == 4){
                               span.innerHTML = reqAjax.response;
                               //mask.setNewParMask();
                               adminArea.getParkData();
                            }
			};
		}
	},*/
        
        getCliData: function(){
            var form = document.getElementById('newCliForm');
                
            if(form){
                form.cliOkButton.onclick = function(){
                    if(validation.newCliData(form)){
                        form.submit();
                    }   
                } 
            } 
        }
        
        
        
        /*getParkData: function(){
            var form = document.getElementById('newParkForm');
                
            if(form){
                form.parkOkButton.onclick = function(){
                    if(validation.newParkData(form)){
                        alert("Cadastro Efetuado Com Sucesso!");
                        form.submit();
                        
                    }   
                } 
            } 
        }*/
};
adminArea.init();